package com.pay.web.utils;

import java.util.UUID;

/**
 * Created by chenweiyi on 2018/1/31.
 */
public class Constants {

    /**
     *  微信商户号ID
     */
    public static String WX_MCH_ID = PropertiesUtils.get("WX_MCH_ID","");

    /**
     *  微信appid
     */
    public static String WX_APP_ID =PropertiesUtils.get("WX_APP_ID","");

    /**
     * 微信异步通知地址，非完整url
     */
    public static String WX_NOTIFY_URL = PropertiesUtils.get("WX_NOTIFY_URL","weixinNotify");


    /**
     * 微信key
     */
    public static String WX_KEY = PropertiesUtils.get("WX_KEY","");

    /**
     * 支付宝app_id
     */
    public static String ALI_APP_ID = PropertiesUtils.get("ALI_APP_ID","2016091300500531");

    /**
     * 支付宝网关
     */
    public static String ALI_GATEWAY = PropertiesUtils.get("ALI_GATEWAY","https://openapi.alipay.com/gateway.do");

    /**
     *公钥
     */
    public static String ALI_APP_PRIVATE_KEY = PropertiesUtils.get("ALI_APP_PRIVATE_KEY","");

    /**
     * 私钥
     */
    public static String ALI_APP_PUBLIC_KEY = PropertiesUtils.get("ALI_APP_PUBLIC_KEY","");

    /**
     * 支付宝异步通知地址，非完整url
     */
    public static String ALI_NOTIFY_URL = PropertiesUtils.get("ALI_NOTIFY_URL","alipayNotify");

    /**
     * 编码
     */
    public  static String CHARSET = "utf-8";

    /**
     * 获取uuid字符串
     * @return
     */
    public static String generateUUID(){
       return UUID.randomUUID().toString().replaceAll("-","");
    }


    public static String PAY_URL = PropertiesUtils.get("PAY_URL","http://0fea825a.ngrok.io/pay/payUrl");


    public static final String FORMAT = "json";


    public static final String ALI_SIGN_TYPE = "RSA2";


}
